#!/usr/bin/env bash

start() {
    local n="$1"
    local x="$((10#$n))"
    ip addr add fd80::$x/80 dev eth0
    #./lisp$n start
    ./lisper$n start
}

stop() {
    local n="$1"
    local x="$((10#$n))"
    ./lisper$n stop
    #./lisp$n stop
    ip addr del fd80::$x/80 dev eth0
}

if [ "$1" ]; then $@; else echo "Usage: $0 <command> <node>"; fi
